
import java.awt.Point;

public class UnitBattleship extends Unit{

	public UnitBattleship(Point coord, Integer s) {
		super(coord, s);	// Call super class's constructor
		unitTypeID = Unit.UNIT_TYPE_ID_BATTLESHIP;
		unitName = "BattleShip";
		unitDescription = "Major sea force of mordern war. They can move on water, and they can attack from sea to ground.";
		hitPoint = remainingHitPoint = 100; // example hitpoint
		attackPower = 50; // example attackPowe
		motionPoint = 10; // example motionPoint
		
		/*
		 * Set attackable area
		 */
		rltAttackableArea.add(new Point(2, 0));
		rltAttackableArea.add(new Point(0, 2));
		rltAttackableArea.add(new Point(-2, 0));
		rltAttackableArea.add(new Point(0, -2));	
		
		/*
		 * Load unit images
		 */
		if(side == Unit.UNIT_SIDE_ID_USER1) {
			addUnitImage(WorldWar.imageLoader.getImageByName(ImageStructure.IMAGE_NAME_UNIT_BATTLESHIP_1_UP));
			addUnitImage(WorldWar.imageLoader.getImageByName(ImageStructure.IMAGE_NAME_UNIT_BATTLESHIP_1_DOWN));
			addUnitImage(WorldWar.imageLoader.getImageByName(ImageStructure.IMAGE_NAME_UNIT_BATTLESHIP_1_LEFT));
			addUnitImage(WorldWar.imageLoader.getImageByName(ImageStructure.IMAGE_NAME_UNIT_BATTLESHIP_1_RIGHT));
		}
		else {
			addUnitImage(WorldWar.imageLoader.getImageByName(ImageStructure.IMAGE_NAME_UNIT_BATTLESHIP_2_UP));
			addUnitImage(WorldWar.imageLoader.getImageByName(ImageStructure.IMAGE_NAME_UNIT_BATTLESHIP_2_DOWN));
			addUnitImage(WorldWar.imageLoader.getImageByName(ImageStructure.IMAGE_NAME_UNIT_BATTLESHIP_2_LEFT));
			addUnitImage(WorldWar.imageLoader.getImageByName(ImageStructure.IMAGE_NAME_UNIT_BATTLESHIP_2_RIGHT));
		}
		
		/*
		 * Set original block image
		 */
		setUnitImageIndex(0);
	}
}
